﻿using LeRenard.Libraries.PlatformInspection.InfoNodes;
using System;
using System.Collections.Generic;

namespace LeRenard.Libraries.PlatformInspection.Inspectors
{
    /// <summary>
    /// Defines a part of code used by a given <see cref="IInspector"/>.
    /// </summary>
    /// <typeparam name="TInspector">The type of the <see cref="IInspector"/> this module belongs to.</typeparam>
    public interface IInspectorModule<TInspector>
    {
        /// <summary>
        /// Gets the type of <see cref="IInspector"/> this module belongs to.
        /// </summary>
        Type InspectorType { get; }

        /// <summary>
        /// Gets the module name.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// Gets the information this module gathers.
        /// </summary>        
        InfoNode GetInformation();

        /// <summary>
        /// Gets the exceptions occured during the last call of <see cref="GetInformation"/>.
        /// </summary>        
        IEnumerable<Exception> Exceptions { get; }
    }
}
